<%@ page pageEncoding="utf-8" %>
<%@include file="/commons/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<fmt:bundle basename="res"><html>
<head>
    <meta charset="utf-8">
    <title><fmt:message key='lb'/></title>
    <jsp:include page="/WEB-INF/commons/commons-header.jsp" flush="true"/>
</head>
<body>

<div class="layui-fluid">
    <div class="layui-card" style="display: none;">
        <div class="layui-form layui-card-header layuiadmin-card-header-auto">

            <div class="layui-form-item">
                <form name="totalForm" id="totalForm" method="get">

                    <input type="hidden" name="ids" value="${ids}">

                    <div class="layui-inline">
                        <button class="layui-btn layui-btn-sm layuiadmin-btn-list" id="search"></button>
                    </div>
                </form>
            </div>
        </div>

    </div>

    <div class="layui-card">
        <div class="layui-field-box layui-form">

            <table class="layui-table" lay-size="sm">
                <thead>
                    <tr>
                        <th width="5%"><input id="checkboxs" type="checkbox" lay-ignore lay-skin="primary"/></th>
                        <th><fmt:message key='xh'/></th>
                        <th><fmt:message key='sjmc'/></th>
                        <th><fmt:message key='yhm'/></th>
                        <th><fmt:message key='sjh'/></th>
                    </tr>
                </thead>
                <c:forEach items="${page.result}" var="item" varStatus="status">
                    <tr>
                        <td><input type="checkbox" lay-ignore data-id="${item.id}" data-name="${item.username}" data-mobile="${item.mobile}" data-nickname="${item.nickname}" value="${item.id}" class="feijin-check" lay-skin="primary"/></td>
                        <td>${status.index + 1}</td>
                        <td>${item.nickname}</td>
                        <td>${item.username}</td>
                        <td>${item.mobile}</td>
                    </tr>
                </c:forEach>
            </table>
            <jsp:include page="/commons/page.jsp" flush="true"/>
        </div>
    </div>

</div>

<script>
    layui.use(["form"], function () {

        //全选反选
        $("#checkboxs").click(function () {
            if (this.checked) {
                $(".feijin-check:checkbox").prop("checked", true);
            } else {
                $(".feijin-check:checkbox").prop("checked", false);
            }
        });
    });
</script>
</body>
</fmt:bundle>
</html>
